<template>
    <view class="dialog">
        <uni-popup ref="popup" type="center" :animation="true">
           <view class="dialogBox" :style="{'background': backColor ? backColor : '#fff'}">
                <slot name="one"/>
                <slot name="two"/>
            </view>
        </uni-popup>
    </view>
</template>

<script>
    export default {
        props: {
            title: {
                type: String,
                value : '温馨提示'
            },
            backColor: {
                type: String,
                value : ''
            },
        },
        data() {
            return {
                
            }
        },
       
        onLoad(e) {
            console.log('title',this.title)
        },
        methods: {
            //打开弹窗
            open(){
                this.$refs['popup'].open()
            },
            //关闭弹窗
            close(){
                this.$refs['popup'].close()
            }
        }
    }
</script>

<style scoped>
    .dialogBox{
        width: 560rpx;
        border-radius: 20rpx;
        position: relative;
        z-index: 999;
        background: #fff;
    }
/*   .dialogBox .title{
        width: 85%;
		margin: 0 auto;
        text-align: center;
        padding-top: 40rpx;
        font-size: 36rpx;
        color: #333;
        font-weight: 500;
    } */
    
</style>
